package com.example.chenhaosblog.controller;

import com.example.chenhaosblog.bean.User;
import com.example.chenhaosblog.service.IUserService;
import com.example.chenhaosblog.utils.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/login")
public class User2Controller {
    @Autowired
    private IUserService service;


    @RequestMapping("/userList2")
    public PageData getUserLis2t() throws Exception {
        PageData pageData = new PageData();
        List<PageData> all = service.findAll(pageData);
        pageData.put("data",all);
        return pageData;
    }
}
